home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
nt
/
zkf102.zip
/
zk.ini
< prev
next >
Wrap
Text File
|
1995-01-04
|
5KB
|
108 lines
// This is zk.ini, the user-modifiable initialization file for zk.
// You are assumed to already be an experienced C++ programmer. These
// comments and the documentation don't give you any C++ help, just
// help with zk. The C++ language is extended by adding a few minor
// features, such as new kinds of macros. See extend.txt for details.
// You can put C++ statements in this file, and they will be
// executed at startup. Header files are usually not needed,
// because common definitions are provided by precompiled headers
// supplied by the background fast-initialization process.
// You can however use your own header files when you need them,
// the normal way.
// C++ statements you put in this file or on the command line are
// executed immediately if they are normal C++ executable statements.
// There is no main(), you just input the C++ statements at the
// command line prompt or in zk.ini (this file), or if you have the
// pro version, you can use other input, such as zkbat script files,
// which can be executed from the operating system command line
// without invoking zk first, and which are explained in scripts.txt.
// While executable C++ statements are executed immediately, other
// kinds of statements, such as function declarations, etc., are
// stored and made available for your code to use, just as if you had
// compiled them.
// In general, you can input anything at the zk command line you can
// put in zk.ini, and vice versa. One minor difference is that some
// commands which don't require a semicolon on the command line do
// require one in zk.ini. Those are the commands that take an unknown
// number of arguments, and any operating system commands defined by
// the cmds macro.
// The following defines the zk command, which you can use to reload
// zk.ini after modifying it, without exiting from zk. To use it, just
// type zk at the zk command line. It calls ldini(), which is a
// compiled function. The definitions you entered at the command line
// will still be there unless new definitions in zk.ini override them.
// Note that zk is an m1 macro, which is one of the new kinds of macros
// explained in extend.txt.
// Don't confuse this zk command with the one you type at the operating
// system command line to invoke zk. The effects are similar but this
// one invokes a macro and that one invokes zk.exe. You can change this
// to some other name than zk if you prefer.
#m1 zk ldini(); %
// The following defines zi as a command to edit zk.ini, but since you
// will be using your own editor, you need to change "vi" to the name
// of your editor.
#m1 zi sys vi zk.ini; %
// The following defines some operating system shell commands, so
// you can use these commands at the zk command line prompt. You
// can add other commands you want to use. You should also change
// "vi" to the name of your editor. You can use the cmds macro as
// many times as you want, to keep adding more commands. For more
// information about the cmds macro, see extend.txt.
cmds dir cls vi copy xcopy;
// The following define qq, to quit, and sh, to shell out to cmd.exe,
// which is the command shell that comes with NT. When you quit, you
// can start fresh by invoking zk again. When you shell out, you
// return to the original zk session by using the exit command.
#m1 qq exitfrominterp(); %
#m1 sh sys cmd; %
// Here we clear the screen and display zk's version message.
// The cls command does not need a semicolon when typed at the
// command line, but it does need one here in zk.ini, for reasons
// explained in extend.txt.
cls;
version();
// The following defines the hi command, used in the message below.
// See library.txt for an explanation of the msg and gsm macros.
// We could use cout<<text<<endl instead of msg/gsm, but then we would
// have to #include iostream.h. The msg and gsm macros are available
// with no explicit #includes, and they also provide some easy
// formatting features, as explained in library.txt. One other advantage
// of msg/gsm is that the output goes to the session log, if any, in
// addition to the console. See environ.txt for details of how to get
// a session log.
#m1 hi(text) msg text gsm; %
hi ""
hi "This message is output from zk.ini, which you can modify."
hi "To modify it, you can use your own editor, which you can invoke from"
hi "The zk command line. If you haven't defined your editor in zk.ini"
hi "yet, you can use \"sys vi zk.ini\", substituting the name of your"
hi "editor for vi."
hi ""
hi "At the zk command line you can enter expressions, program statements,"
hi "classes, functions, etc., like in an ordinary c++ program."
hi ""
hi "You can make a sophisticated desk calculator by defining functions"
hi "in zk.ini and using them at the zk command line. Unlike normal c++"
hi "you don't have to explicitly request output for common expression"
hi "result types. That is, when an expression such as 2+2 is entered at"
hi "the zk command line, the result is displayed automatically unless"
hi "you use it as part of another expression or explicitly suppress it."
hi ""
hi "See zkdoc.txt for a list of documentation."
hi ""
hi "The command to exit from zk is qq."
hi ""